import Cookie from 'js-cookie'
import { useStore } from '../store'

export const getCookieSync = (key: string): string => {
    return Cookie.get(key) || useStore()?.getters?.token || ''
}

export const setCookie = (key: string, value: string): void => {
    Cookie.set(key, value)
}